package com.zrar.ak.gkpt.dao;

import com.zrar.ak.gkpt.model.bo.*;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;
/**
 * @ClassName: IBusinessBidPurchaseBidTerminalDao
 * @Description 招标采购-终端表Dao层
 * @Author HuangKeXin
 * @Time 2020/04/3
 */
@Repository("businessBidPurchaseBidTerminalDao")
public interface IBusinessBidPurchaseBidTerminalDao  extends Mapper<BusinessBidPurchaseBidTerminalBO> {

        /**
         * 根据建设单位删除信息
         *
         * @param id
         * @return
         */
        int deleteById(String id);


        /**
         * 添加信息
         *
         * @param
         * @return
         */
        int insertInfo(List<BusinessBidPurchaseBidTerminalBO> terminalInfoBOList);



        int updateInfo(List<BusinessBidPurchaseBidTerminalBO> terminalList);

        int queryByType(Map map);

    List<BusinessBidPurchaseBidTerminalBO> queryAllByBasicsId(String basicsId);

//
//        List<BusinessBidPurchaseBidTerminalBO> queryAllByBasicsId(String basicsId);
//@Select(("SELECT COUNT(1) AS TOTAL FROM BUSINESS_BID_PURCHASE_TERMINAL WHERE IS_DELETE='0' AND UNIT_ID=#{unitId}"))
//Integer queryExistCountByBusinessBidTerminalUnitId(String unitId);
//
//    @Update(" UPDATE BUSINESS_BID_PURCHASE_TERMINAL SET IS_DELETE='1' WHERE IS_DELETE='0' AND UNIT_ID = #{unitId}")
//    void deleteBusinessBidTerminalByUnitId(String unitId);
//

    }
